import request from './request';

// 下载题目导入模板
export function downloadTemplate() {
  return request({
    url: '/api/questions/template',
    method: 'get',
    responseType: 'blob'
  });
}

// 导入题目
export function importQuestions(data: FormData, moduleType: string) {
  return request({
    url: '/api/questions/import',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'multipart/form-data',
      'X-Module-Type': moduleType
    }
  });
}

// 导出题目
export function exportQuestions(params: any) {
  return request({
    url: '/api/questions/export',
    method: 'get',
    params,
    responseType: 'blob'
  });
}